package com.petplanet.common.ui.widgets

import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp

@Composable
fun CustomDivider(
    orientation: Orientation,
    color: Color = Color.Black.copy(0.2f),
    size: Dp = 1.dp,
    contentPaddingValues: Dp = 0.dp,
    padding: Dp = 4.dp
){
    when(orientation){
        Orientation.Vertical -> {
            Box(modifier = Modifier
                .padding(horizontal = contentPaddingValues, vertical = padding)
                .background(color)
                .width(size)
                .fillMaxHeight()

            )
        }
        Orientation.Horizontal -> {
            Box(modifier = Modifier
                .padding(horizontal = padding, vertical = contentPaddingValues)
                .background(color)
                .height(size)
                .fillMaxWidth()
            )
        }
    }
}

